					<!-- Main Content table : stop -->
					<!-- Footer : start -->
					</div><!-- content end -->
					<div class="sidebar">
					
						<?php
						
						// If Logged In
						if (!auth_check($session->fetch('login'), $session->fetch('password')))
						{
						
						?>
						<div class="block">
							<div class="t">
								<div class="holder">
									<h3><?php echo $lang['Menu_User_Login']; ?></h3>
									<div class="login-form">
										<form action="<? echo URL . '/login.php'; ?>" method="POST">
											<fieldset>
												<div class="row">
													<label for="lb03" class="log"><?php echo $lang['Realtor_Login']; ?></label>
													<input id="lb03" name="login" type="text" class="text" />
													<label for="lb04" class="pass"><?php echo $lang['Realtor_Password']; ?></label>
													<input id="lb04" name="password" type="password" class="text" />
												</div>
												<div class="row">
													<input class="submit" type="submit" value="<?php echo $lang['Realtor_Login']; ?>" />
												</div>
											</fieldset>
										</form>
									</div>
									<div class="reg-info">
										<img src="<?php echo URL . '/templates/' . $cookie_template . '/'; ?>images/ico-004.gif" width="43" height="48" alt="image" />
										<p>Don&rsquo;t have an account? <a href="<?php echo URL; ?>/submit.php"><?php echo $lang['Menu_Submit_Listing']; ?></a> for one to easily organize and save your searches!</p>
									</div>
								</div>
							</div>
						</div>
						<?php } else { ?>
						<div class="block">
							<div class="t">
								<div class="holder">
									<h3><?php echo $lang['Menu_User_Login']; ?></h3>
									<div class="login-form">
										
									</div>
									<div class="reg-info">
										<img src="<?php echo URL . '/templates/' . $cookie_template . '/'; ?>images/ico-004.gif" width="43" height="48" alt="image" />
										<p><a href="<?php echo URL; ?>/login.php"><?php echo $lang['Menu_User_Login']; ?></a></p>
										<p><a href="<?php echo URL; ?>/index.php?req=logout"><?php echo $lang['Realtor_Logout']; ?></a></p>
									</div>
								</div>
							</div>
						</div>
						<?php } ?>
						
						<ul class="bar">
							
						<?php
						
						switch ( $page )
						{
							case 'calculator':
								$link_sub1 = ' class="active" ';
							break;
							
							case 'compare':
								$link_sub2 = ' class="active" ';
							break;
							
							case 'sitemap':
								$link_sub3 = ' class="active" ';
							break;
							
							case 'contact':
								$link_sub4 = ' class="active" ';
							break;
							
						}
						
						?>
						
							<li <?php echo $link_sub1; ?>><a href="<?php echo URL; ?>/calculator.php"><?php echo $lang['Mortgage_Calculator']; ?></a></li>
							<li <?php echo $link_sub2; ?>><a href="<?php echo URL; ?>/compare.php"><?php echo $lang['Compare']; ?></a></li>
							<li <?php echo $link_sub3; ?>><a href="<?php echo URL; ?>/sitemap.php"><?php echo $lang['Menu_Site_Map']; ?></a></li>
							<li <?php echo $link_sub4; ?>><a href="<?php echo URL; ?>/mail.php"><?php echo $lang['Menu_Contact_Us']; ?></a></li>
						</ul>
						<div class="block">
							<div class="t">
								<div class="holder">
									<h3><?php echo $lang['Property_Search']; ?></h3>
									<div class="quick-form">
										<form action="<?php echo URL; ?>/search.php" method="post" name="form">
											<fieldset>
												<div class="row">
													<div class="cols">
														<label for="lb05"><?php echo $lang['Search_Keyword']; ?></label>
														<input id="lb05" type="text" class="text" name="keyword" />
														<label><?php echo $lang['Order_By']; ?></label>
														<select class="cs-6">
															<?
															$order_options = '';
															if (strcasecmp($conf['show_mls'], 'OFF')) {
																$order_options .= '<option value="mls">' . $lang['Listing_MLS'] . '</option>';
															}
															$order_options .= '<option value="title">' . $lang['Listing_Title'] . '</option>
															<option value="price">' . $lang['Listing_Price'] . '</option>
															<option value="bathrooms">' . $lang['Listing_Bathrooms'] . '</option>
															<option value="bedrooms">' . $lang['Listing_Bedrooms'] . '</option>';
															if (strcasecmp($conf['show_postal_code'], 'OFF')) {
																$order_options .= '<option value="zip">' . $lang['Zip_Code'] . '</option>';
															}
															$order_options .= '
															<option value="year_built">' . $lang['Listing_Year_Built'] . '</option>
															<option value="date_added">' . $lang['Date_Added'] . '</option>
															<option value="date_updated">' . $lang['Date_Updated'] . '</option>
															
																 	 ';
																 	 
															echo $order_options; ?>

														</select>
													</div>
													<div class="cols ar">
														<label for="lb06"><?php echo $lang['Your_Zip_Code']; ?></label>
														<input id="lb06" type="text" class="text" name="your_zip" maxlength="7"/>
														<label><?php echo $lang['Your_Zip_Code_Radius']; ?></label>
														<select class="cs-7" name="miles">
															<option value="">-</option>
															 <option value="1">1</option>
															 <option value="2">2</option>
															 <option value="5">5</option>
															 <option value="10">10</option>
															 <option value="20">20</option>
															 <option value="50">50</option>
														</select>
													</div>
												</div>
												<div class="row">
													<input class="submit" type="submit" name="property_search" value="Search" />
												</div>
											</fieldset>
										</form>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div><!-- over end -->
			</div><!-- main end -->
		</div><!-- wrapper end -->
		<div id="footer">
			<div class="holder">
				<div class="info-hold">
					<span><?php include ( PATH . '/includes/common_footer.php' ); ?></span>
				</div>
				<div class="hold">
					<ul>
						<li><a href="<?php echo URL; ?>/"><?php echo $lang['Menu_Home']; ?></a></li>
						<li><a href="<?php echo URL; ?>/alerts.php"><?php echo $lang['Alert']; ?></a></li>
						<li><a href="<?php echo URL; ?>/advsearchform.php"><?php echo $lang['Menu_Search']; ?></a></li>
						<li><a href="<?php echo URL; ?>/calculator.php"><?php echo $lang['Mortgage_Calculator']; ?></a></li>
						<li><a href="<?php echo URL; ?>/advsearchform.php"><?php echo $lang['Realtor_Search']; ?></a></li>
						<li><a href="<?php echo URL; ?>/Pages/example-page.html">Article</a></li>
					</ul>
					<p>&copy;<?php echo date('Y'); ?> <?php echo $conf['website_name_short']; ?></p>
				</div>
			</div>
		</div><!-- footer end -->
		<?php include (PATH . '/includes/timings.php'); ?>
	</body>
</html>


<!-- Footer : stop -->